package com.yuand.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuand.entity.SysUser;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: UserMapper
 * @Author: yuandong
 * @Date 2022/1/14 15:14
 */
@Repository
public interface UserMapper extends BaseMapper<SysUser> {

    /**
     * 查询用户列表
     * @param user
     * @return
     */
    public List<SysUser> selectUserList(SysUser user);

    /**
     * 根据用户名查询用户(包括该用户的角色信息)
     * @param userId
     * @return
     */
    public SysUser selectUserById(Long userId);


    public int deleteUserByIds(Long[] userIds);

    /**
     * 查询角色已授权用户列表
     * @param sysUser
     * @return
     */
    public List<SysUser> selectAllocatedUserList(SysUser sysUser);


    /**
     * 查询角色未授权用户列表
     * @param sysUser
     * @return
     */
    public List<SysUser> selectUnAllocatedUserList(SysUser sysUser);
}
